package view.tip
{
	import flash.display.Sprite;
	import flash.text.TextField;
	import flash.text.TextFieldAutoSize;
	import flash.text.TextFormat;

	/**
	 *@author CrazyChen
	 *2013-6-8
	 *public class BaseTip extends Sprite
	 *import flash.display.Sprite;
	 
	 */
	public class BaseTip extends Sprite
	{
		protected var txt:TextField;
		
		protected var sprite:Sprite;
		
		public function BaseTip()
		{
			super();
			this.mouseChildren = false;
			this.mouseEnabled = false;
			initface();
		}
		
		private function initface():void
		{
			sprite = new Sprite();
			this.addChild(sprite);
			sprite.graphics.lineStyle(1,0x0066FF,0.4);
			sprite.graphics.beginFill(0x555555,0.6);
			sprite.graphics.drawRoundRect(0,0,200,100,15,15);
			sprite.graphics.endFill();
			
			txt = new TextField();
			this.addChild(txt);
			txt.defaultTextFormat = new TextFormat("宋体",14,0xffffff);
			txt.mouseEnabled = false;
			txt.autoSize = TextFieldAutoSize.LEFT;   
		}
		
		public function hide():void{
			if(this.parent)this.parent.removeChild(this);
		}
		
	}
}